#define _CRT_SECURE_NO_WARNINGS 1

int removeDuplicates(int* nums, int numsSize) {
    int src = 1;
    int des = 0;
    while (src < numsSize)
    {
        if (nums[src] == nums[des])
        {
            src++;
        }
        else
        {
            nums[++des] = nums[src++];
        }
    }
    return des + 1;

}